package com.visikard.response;

import org.json.JSONException;
import org.json.JSONObject;

public class MerchantGetDashBoardInfoResponse extends BaseResponse {
	private long totalAudiences;
	private long totalCampaigns;
	private long totalPoints;
	private long totalCoupons;
	private long totalGiftKards;

	public long getTotalAudiences() {
		return totalAudiences;
	}

	public void setTotalAudiences(long totalAudiences) {
		this.totalAudiences = totalAudiences;
	}

	public long getTotalCampaigns() {
		return totalCampaigns;
	}

	public void setTotalCampaigns(long totalCampaigns) {
		this.totalCampaigns = totalCampaigns;
	}

	public long getTotalPoints() {
		return totalPoints;
	}

	public void setTotalPoints(long totalPoints) {
		this.totalPoints = totalPoints;
	}

	public long getTotalCoupons() {
		return totalCoupons;
	}

	public void setTotalCoupons(long totalCoupons) {
		this.totalCoupons = totalCoupons;
	}

	public long getTotalGiftKards() {
		return totalGiftKards;
	}

	public void setTotalGiftKards(long totalGiftKards) {
		this.totalGiftKards = totalGiftKards;
	}

	@Override
	public void extractDataFromServer(String response) throws JSONException {
		super.extractDataFromServer(response);

		if (errorCode == SUCCESS) {
			JSONObject jObj = getDataJObject(response);
			totalAudiences = jObj.getLong("totalAudiences");
			totalCampaigns = jObj.getLong("totalCampaigns");
			totalPoints = jObj.getLong("totalPoints");
			totalCoupons = jObj.getLong("totalCoupons");
			totalGiftKards = jObj.getLong("totalGiftKards");
		}
	}

}
